﻿using QLBH.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace QLBH.DAO
{
    class DAO_NghiepVu
    {
        public DAO_NghiepVu()
        {
            Connection_Sql.StartConnect();
        }
        public int Insert(NghiepVu n)
        {
            IDictionary<string, string> d = new Dictionary<string, string>();
            d.Add("@MA_NGHV", n.Ma_ngv);
            d.Add("@TEN_NGHV", n.Ten_ngv);
            d.Add("@nguoithan", n.Nguoithan);
            d.Add("@dtps", n.Dtps.ToString());
            d.Add("@dtbh", n.Dtph.ToString());
            d.Add("@dttt", n.Dttt.ToString());
            d.Add("@NAM_BC ", n.Nam_pc);
            String spInsert = "insert_Nghiepvu";
            return Connection_Sql.Insert(spInsert, d, true);
        }
    }
}
